
package com.jf.cloud.api.user.feign;

import com.jf.cloud.api.user.dto.FinanceDetailDTO;
import com.jf.cloud.api.user.dto.UserTypeDTO;
import com.jf.cloud.api.user.vo.FinanceDetailExcelVO;
import com.jf.cloud.api.user.vo.FinanceDetailVO;
import com.jf.cloud.common.database.vo.PageVO;
import com.jf.cloud.common.feign.FeignInsideAuthConfig;
import com.jf.cloud.common.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 会员等级日志
 * @author zz
 */
@FeignClient(value = "jfcloud-user",contextId = "user-level")
public interface UserLevelLogClient {

    /**
     * 获取会员等级购买金额，并生成购买vip的订单
     * @param userLevelLogId 会员等级购买记录id
     * @return
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/insider/userLevel/getPayAmount")
    ServerResponseEntity<Long> getPayAmount(@RequestParam("userLevelLogId") Long userLevelLogId);

    /**
     * 获取会员等级购买记录是否已经支付
     * @param userLevelLogId 会员等级购买记录id
     * @return
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/insider/userLevel/getIsPay")
    ServerResponseEntity<Integer> getIsPay(@RequestParam("userLevelLogId") Long userLevelLogId);

    /**
     * 获取指定时间内的用户类型
     * @param userTypeDTO
     * @return
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDER_URL_PREFIX + "/userLevel/getUserTypeAtTime")
    ServerResponseEntity<Integer> getUserTypeAtTime(@RequestBody UserTypeDTO userTypeDTO);

    /**
     * 获取会员购买财务对账信息
     * @param financeDetailDTO
     * @return
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/insider/userLevel/pageFinanceDetail")
    ServerResponseEntity<PageVO<FinanceDetailVO>> pageFinanceDetail(@RequestBody FinanceDetailDTO financeDetailDTO);

    /**
     * 获取会员购买财务对账信息
     * @param financeDetailDTO
     * @return
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/insider/userLevel/listFinanceDetail")
    ServerResponseEntity<List<FinanceDetailExcelVO>> listFinanceDetail(@RequestBody FinanceDetailDTO financeDetailDTO);
}
